<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="stylesheet" href="p3.css">
  <title>学生数据管理</title>
</head>

<body>
  <h1>学生数据管理</h1>
  <button id="addButton">新增学生</button>
  <table id="student-table">
    <thead>
      <tr>
        <th>姓名</th>
        <th>年龄</th>
        <th>专业</th>
        <th>年级</th>
        <th>操作</th>
      </tr>
    </thead>
    <tbody></tbody>
  </table>
  <div id="formContainer" style="display:none;">
    <h2>新增/修改学生信息</h2>
    <label for="name">姓名：</label><input type="text" id="name" required><br>
    <label for="age">年龄：</label><input type="number" id="age" required><br>
    <label for="major">专业：</label><input type="text" id="major" required><br>
    <label for="grade">年级：</label><input type="text" id="grade" required><br>
    <button id="saveButton">保存</button>
    <button id="cancelButton">取消</button>
  </div>
  <script src="p3.js"></script>
</body>

</html>